<html>
<head><meta charset="utf-8"><title>do not borrow non-Sync data in constants #54424 · t-compiler/const-eval · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/index.html">t-compiler/const-eval</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html">do not borrow non-Sync data in constants #54424</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="176510818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/176510818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#176510818">(Sep 24 2019 at 22:01)</a>:</h4>
<blockquote>
<p>well, we could start with a future incompat lint based on <a href="https://github.com/rust-lang/rust/pull/54424" target="_blank" title="https://github.com/rust-lang/rust/pull/54424">https://github.com/rust-lang/rust/pull/54424</a></p>
</blockquote>
<p>I think we should yes</p>



<a name="176510830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/176510830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#176510830">(Sep 24 2019 at 22:01)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> there were only like 18 regressions in crater anyways</p>



<a name="176510932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/176510932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#176510932">(Sep 24 2019 at 22:02)</a>:</h4>
<p>if those are unique, that's a lot</p>



<a name="176510941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/176510941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#176510941">(Sep 24 2019 at 22:02)</a>:</h4>
<p>Not for a soundness hole</p>



<a name="176510948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/176510948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#176510948">(Sep 24 2019 at 22:03)</a>:</h4>
<p>We have closed holes with way more than 18</p>



<a name="176510977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/176510977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#176510977">(Sep 24 2019 at 22:03)</a>:</h4>
<p>and the more we delay, the worse it gets</p>



<a name="177713385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/177713385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#177713385">(Oct 09 2019 at 13:30)</a>:</h4>
<p>Cc <a href="https://github.com/rust-lang/rust/issues/49206" target="_blank" title="https://github.com/rust-lang/rust/issues/49206">https://github.com/rust-lang/rust/issues/49206</a></p>



<a name="177713401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/177713401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#177713401">(Oct 09 2019 at 13:30)</a>:</h4>
<p>yeah I have this somewhere on my stack but there were always so many other things to do...</p>



<a name="177713409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/177713409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#177713409">(Oct 09 2019 at 13:30)</a>:</h4>
<p>also I was waiting for AST borrowck to go away because that was an annoying bit here</p>



<a name="177713414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/177713414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#177713414">(Oct 09 2019 at 13:31)</a>:</h4>
<p>but that excuse is gone now thanks to <span class="user-mention" data-user-id="126931">@centril</span> &lt;3</p>



<a name="177713453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/177713453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#177713453">(Oct 09 2019 at 13:31)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> ah! ast_borrowck makes total sense</p>



<a name="177713537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/do%20not%20borrow%20non-Sync%20data%20in%20constants%20%2354424/near/177713537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/do.20not.20borrow.20non-Sync.20data.20in.20constants.20.2354424.html#177713537">(Oct 09 2019 at 13:32)</a>:</h4>
<p>I had the same excuse wrt. or-patterns and not implementing crap for ast_borrowck in relation to that <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>